﻿using CSharpDay13Nov10.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.AspNet.Identity.Owin;
using CSharpDay13Nov10.Adapters.Interfaces;
using CSharpDay13Nov10.Adapters.Adapters;

namespace CSharpDay13Nov10.Controllers
{
    public class apiUserController : ApiController
    {
        IUserAdapter _adapter;
        public apiUserController()
        {
            _adapter = new UserAdapter();
        }
        public apiUserController(IUserAdapter adapter)
        {
            _adapter = adapter;
        }

        public IHttpActionResult Post(NewUserVM user)
        {
            _adapter.RegisterUser(user);
            return Ok();
        }
    }
}
